package com.wangp.safeCommit.controller;


import com.wangp.safeCommit.dto.DicItemQueryResponseDTO;
import com.wangp.safeCommit.service.ITbBcDicItemService;
import com.wangp.safeCommit.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 字典项目 前端控制器
 * </p>
 *
 * @author zhangliang
 * @since 2024-12-17
 */
@RestController
@RequestMapping("/safeCommit/tbBcDicItemEntity")
@CrossOrigin
public class TbBcDicItemController {

    @Autowired
    private ITbBcDicItemService dicItemService;

    /**
     * 字典查询列表类型
     * @param dicCode
     * @return 字典列表类型
     */
    @GetMapping ("/dss/api/hazard/getDicItemList")
    public Result<List<DicItemQueryResponseDTO>> getDicItemList(String dicCode) {

        return Result.success(dicItemService.getDicItemList(dicCode));
    }

}

